package com.timesheet.gui.efforttracker.container;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.timesheet.server.common.models.EffortTrackerDTO;
import com.timesheet.server.common.models.ViewModel;
import com.timesheet.server.common.models.view.EffortTrackerViewModel;

public class UtilisationModelContainer extends ViewModel {	
	private static UtilisationModelContainer modelContainer;
	private List<EffortTrackerDTO> utilisationList = new ArrayList<EffortTrackerDTO>();
	private Map<String,EffortTrackerDTO> utilisationMap = new HashMap<String,EffortTrackerDTO>();
	
	private List<Double> hoursList = new ArrayList<Double>();
	private EffortTrackerViewModel effortTrackerViewModel;
	private List<EffortTrackerDTO> detailedEffortTrackerDto = null;
	private EffortTrackerDTO effortTrackerDTO;
	private Date fromDate;
	private Date toDate;	
	public UtilisationModelContainer() {		
	}
	
	public static UtilisationModelContainer getInstance() {
		if (modelContainer == null) {
			modelContainer = new UtilisationModelContainer();
		}
		return modelContainer;
	}
	
	public void setUtilisationList(List<EffortTrackerDTO> list){
		this.utilisationList = list ;
	}
	
	public List<EffortTrackerDTO> getUtilisationList() {
		return utilisationList;
	}
	public void setHoursList(List<Double> hoursList) {
		this.hoursList = hoursList;
	}
	
	public List<Double> getHoursList() {
		return hoursList;
	}
	
	public void setUtilisationMap(Map<String, EffortTrackerDTO> utilisationMap) {
		this.utilisationMap = utilisationMap;
	}
	
	public Map<String, EffortTrackerDTO> getUtilisationMap() {
		return utilisationMap;
	}
	
	
	public void setEffortTrackerViewModel(
			EffortTrackerViewModel effortTrackerViewModel) {	
		this.effortTrackerViewModel = effortTrackerViewModel;

	}

	public EffortTrackerViewModel getEffortTrackerViewModel() {
		return effortTrackerViewModel;
	}
	
	public void setDetailedUtilisationList(List<EffortTrackerDTO> detailedEffortTrackerDto){
		this.detailedEffortTrackerDto = detailedEffortTrackerDto;
		
	}
	
	public List<EffortTrackerDTO> getDetailedUtilisationList() {
		return detailedEffortTrackerDto ;
	}
	
	public EffortTrackerDTO getEffortTrackerDTO(){
		return this.effortTrackerDTO ;
	}
	
	public void setEffortTrackerDTO(EffortTrackerDTO effortTrackerDTO){
		this.effortTrackerDTO = effortTrackerDTO ;
	}
	
	public void setFromDate(Date fromDate){ 
		this.fromDate = fromDate ;
		
	}
	
	public void setToDate(Date toDate){
		this.toDate = toDate ;
		
	}
	
	public Date getFromDate() {
		return fromDate;
	}
	
	public Date getToDate() {
		return toDate;
	}
	
	
	
	

}
